import java.util.Arrays;

public class Test {

    public static void main(String[] args) {
        int[][] array = new int[2][];
        array[0] = new int[3];
        array[1] = new int[5];

        for (int i = 0; i < array.length; i++) {
            for (int j = 0; j < array[i].length; j++) {
                System.out.print(array[i][j] + " ");
            }
            System.out.println();
        }
    }

    public static void main10(String[] args) {
        int[][] array = {{1,2,3},{4,5,6}};
        /*for (int i = 0; i < array.length; i++) {
            for (int j = 0; j < array[i].length; j++) {
                System.out.print(array[i][j] + " ");
            }
            System.out.println();
        }*/

        System.out.println(Arrays.deepToString(array));
    }

    public static void main9(String[] args) {
        int[] array = new int[5];
        Arrays.fill(array, 1, 4, -1);
        System.out.println(Arrays.toString(array));
    }

    public static void main8(String[] args) {
        int[] array1 = {1,2,3,4};
        int[] array2 = {1,2,3,4};
        boolean ret = Arrays.equals(array1, array2);
        System.out.println(ret);
    }

    public static void main7(String[] args) {
        int[] array = {6,9,8,7,5,4,3,2,1,0};
        Arrays.sort(array);
        System.out.println(Arrays.toString(array));
    }

    public static void main6(String[] args) {
        int[] array = {1,2,3,4,5};
        int ret = Arrays.binarySearch(array, 1);
        System.out.println(ret);
    }

    public static void main4(String[] args) {
        int[] array = {1,2,3,4,5};
        // int[] ret = Arrays.copyOf(array, array.length*2);

        // int[] ret = Arrays.copyOfRange(array, 2, 5);
        int[] ret = new int[array.length];
        System.arraycopy(array, 1, ret, 2, 2);
        System.out.println(Arrays.toString(ret));
    }

    public static void main3(String[] args) {
        int[] array = {1,2,3,4,5};
        String ret = Arrays.toString(array);
        System.out.println(ret);

    }

    public static void test(int[] array){
        array = new int[]{100,200,300,400,500};
        array[0] = 10000;
    }

    public static void main2(String[] args) {
        int[] array = {1,2,3,4,5};
        test(array);
        System.out.println(Arrays.toString(array));
    }

    public static void main1(String[] args) {
        int[] array = {1,2,3,4,5};
        func(array);
        System.out.println(array[0]);
    }

    public static void func(int[] array){
        array[0] = 100;
        System.out.println(array[0]);
    }
}
